<template>
   <div class="total">
       <div class="box">
            <div class="p-title" style="font-size:30px;font-weight:bold;padding-top:20px;">{{title}}</div>

        <el-card
        v-for="(item,index) in arr"
        shadow="never"
        :key="index"
        style="width:80%;margin: 0 auto;border:none;padding-left:0px;"
      >
        <!-- -->
        <template>
          <v-choice
            :item="item"
            :auto-id="showId"
            :num="index"
            
          ></v-choice>
        </template>

        
      </el-card>
      
       </div>
   </div>
</template>

<script>
import VChoice from '@/components/Vote/VChoice'
import {GetVoteScore} from '../../api'

export default {
    data(){
        return{
            title:"",
             arr:[
            ],
            
        }
    },
    components:{
        VChoice
    },
    async mounted(){
        let res = JSON.parse(this.$UrlEncode.decode(this.$route.query.questionnaireId))
        const id=res/1234;
        console.log('aaaa')
        console.log(id)
        const result=await GetVoteScore(id)
        console.log('25')
        console.log(result)
        this.arr=result.data_list
        console.log(this.arr)
        this.title=result.title
      //  this.sum=result.total_question_count
      //  console.log(this.sum)
    }
}

</script>
<style scoped>
html,body{
    height: 100%;
    width: 100%;
}
.total{
  height: 100%;
  width: 100%;
  background-color: #d1e9fa;
  overflow: auto;
}
.box{
    width: 850px;
    min-height: 730px;
    
    margin: 0 auto;
    margin-top:10px;
    background-color: #fff;
   
    text-align: center;
}

</style>